<?php
$db_host = '127.0.0.1';
$db_post = '3306';
$db_username = 'root';
$db_password = 'SZ3l1w)(l';
$cache_host = '192.168.0.235';

$redis_host = '192.168.0.235';
$redis_port = '6379';
$redis_db = '0';
$redis_password = 'yyrrr1234';

$enableSchemaCache = false;
$schemaCacheDuration = 3600;
return [
    'bootstrap' => ['debug','gii'],
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
            'allowedIPs' => ['*.*.*.*','127.0.0.1', '::1'],
        ],
        'gii' => [
            'class'=>'yii\gii\Module',
            'generators'=>[
                'yrmodule'=>'backend\gii\generators\yrmodule\Generator',
                'yrmodel'=>'backend\gii\generators\yrmodel\Generator',
                'yrcrud'=>'backend\gii\generators\yrcrud\Generator',
            ],
        ]
    ],
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=' . $db_host . ';port=' . $db_post . ';dbname=beauty_stat',
            'username' => $db_username,
            'password' => $db_password,
            'charset' => 'utf8mb4',
            'tablePrefix' => 't_',
            'enableSchemaCache' => $enableSchemaCache,
            'schemaCacheDuration' => $schemaCacheDuration,
            'schemaCache' => 'backendCache',
        ],
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => $redis_host,
            'port' => $redis_port,
            'password' => $redis_password,
            'database' => $redis_db,
        ],

    ],
];
